<template>
	<view class='page'>
		<view class='list'>
			<view class='list-item' v-for='(item,index) in list' :key="index">
				<view class='title'>{{item.serveName}}</view>
				<view class='form'>
					<view class='form-item'>
						<view class='label'>宠物名:</view>
						<view class='value'>{{item.cargoName}}</view>
					</view>
					<view class='form-item'>
						<view class='label'>宠物主:</view>
						<view class='value'>{{item.userName}}</view>
					</view>
					<view class='form-item'>
						<view class='label'>使用时间:</view>
						<view class='value'>{{item.createTime}}</view>
					</view>
					<view class='form-item'>
						<view class='label'>剩余使用次数:</view>
						<view class='value'>{{item.unusedNum}}次</view>
					</view>
					<view class='form-item'>
						<view class='label'>核销人:</view>
						<view class='value'>{{item.employName}}</view>
					</view>
					<view class='form-item'>
						<view class='label'>核销人手机号:</view>
						<view class='value'>{{item.employTel}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getCheckList
	} from "@/api/pet/service/saler.js"
	export default {
		data() {
			return {
				item: {},
				list: []
			}
		},
		onLoad(e) {
			if(e.item){
				this.item = JSON.parse(decodeURIComponent(e.item))
				this.getList()
			}
		},
		methods: {
			
			getList() {
				getCheckList({
					issueId:this.item.issueId
				}).then(res=>{
					this.list = res
				})
			}
		}
	} 
</script>

<style scoped lang="scss">
	.page {
		width: 100%;
		min-height: 100vh;
		background-color: #F8F8F8;
	}
	
	.list {
		padding: 0 16rpx 32rpx 16rpx;
		
		.list-item {
			margin-bottom: 16rpx;
			padding: 28rpx 24rpx;
			background: #FFFFFF;
			
			.title {
				font-weight: 600;
				font-size: 32rpx;
				color: var(--h1Color);
				line-height: 45rpx;
			}
			
			.form {
				margin-top: 24rpx;
				
				.form-item {
					display: flex;
					font-size: 28rpx;
					color:  var(--h2Color);
					line-height: 40rpx;
					margin-bottom: 12rpx;
					
					&:last-child {
						margin-bottom: 0;
					}
					
					.label {
						width: 196rpx;
						margin-right: 12rpx;;
					}
				}
			}
		}
	}
</style>